home *** CD-ROM | disk | FTP | other *** search
PiXCL source | 1996-07-28 | 12.8 KB | 518 lines |
- { Filename : vr299set.pxl
- Purpose : Video diagnostic for VR-299
- Version : 1.2 RELEASE
- Date : 16-feb-1995
- Author : S.Dibbs, VYSOR Integration Inc
-
- Version : 4.0 RELEASE
- Date : 30-may-1996
- Author : S.Dibbs, VYSOR Integration Inc
-
- ------------------------------------------------------------------------}
-
- Initialize:
- WinGetActive(Current$)
- GetScreenCaps(BITSPIXEL,BitsPerPixel)
- GetScreenCaps(HORZRES,X_Pixels)
- GetScreenCaps(VERTRES,Y_Pixels)
-
- If BitsPerPixel = 8 Then Set Title$ = "WIN95 8-bit Colour Scale v4.0"
- If BitsPerPixel = 15 Then Set Title$ = "WIN95 15-bit Colour Scale v4.0"
- If BitsPerPixel = 16 Then Set Title$ = "WIN95 16-bit Colour Scale v4.0"
- If BitsPerPixel = 24 Then Set Title$ = "WIN95 24-bit Colour Scale v4.0"
- WinTitle(Current$,Title$)
- WinLocate(Title$,0,0,X_Pixels,Y_Pixels,Res)
- UseBackground(TRANSPARENT,0,0,0)
- DrawBackGround
- UseCoordinates(PIXEL)
- DirGet(SourceDir$)
- Set Draw_All_Grids = 0
-
-
- SetMenu("E&xit",Run_Leave,
- ENDPOPUP,
- "&Colour Wedge",Wedge,
- ENDPOPUP,
- "&Geometric Pattern",Geom,
- ENDPOPUP,
- "&Draw Grids",IGNORE,
- "Grid &1",Grid,
- "Grid &2",Grid2,
- "Grid &3", Grid3,
- "Draw &All",All_Grids,
- ENDPOPUP,
- "&Help",IGNORE,
- "Colour Wedge",Help_Wedge,
- "Geometric Pattern",Help_Pattern,
- "Grids",Help_Grids,
- SEPARATOR,
- "&About",About,
- ENDPOPUP)
-
-
- Wait_for_Input:
- WaitInput()
-
- Invert:
- InvertRectangle(cx1,cy1,cx2,cy2)
- Goto Wait_for_Input
-
- Wedge:
- DrawBackground
- SetMouse()
- WinGetClientRect("",cx1,cy1,cx2,cy2)
- SetRightMouse(cx1,cy1,cx2,cy2,Invert,X,Y)
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 11 Set Y2 = 94
- UsePen(SOLID,2,255,255,255)
- UseBrush(NULL,0,0,0)
- DrawRectangle(0,10,1023,96) {Gray}
- DrawRectangle(0,110,1023,196) {Red}
- DrawRectangle(0,210,1023,296) {Green}
- DrawRectangle(0,320,1023,396) {Blue}
- DrawRectangle(0,410,1023,496) {Yellow}
- DrawRectangle(0,510,1023,596) {Magenta}
- DrawRectangle(0,610,1023,696) {Cyan}
-
- GrayLoop:
- If X1 = 1025 Then Goto EndGrayLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Red < 7 Then Set Red = Red + 7
- If Green < 7 Then Set Green = Green + 7
- If Blue < 7 Then Set Blue = Blue + 7
- If Red >= 7 Then Set Red = Red + 8
- If Green >= 7 Then Set Green = Green + 8
- If Blue >= 7 Then Set Blue = Blue + 8
- Goto GrayLoop
- EndGrayLoop:
-
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 111 Set Y2 = 194
- RedLoop:
- If X1 = 1025 Then Goto EndRedLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Red < 7 Then Set Red = Red + 7
- If Red >= 7 Then Set Red = Red + 8
- Goto RedLoop
- EndRedLoop:
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 211 Set Y2 = 294
- GreenLoop:
- If X1 = 1025 Then Goto EndGreenLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Green < 7 Then Set Green = Green + 7
- If Green >= 7 Then Set Green = Green + 8
- Goto GreenLoop
- EndGreenLoop:
-
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 321 Set Y2 = 394
- BlueLoop:
- If X1 = 1025 Then Goto EndBlueLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Blue < 7 Then Set Blue = Blue + 7
- If Blue >= 7 Then Set Blue = Blue + 8
- Goto BlueLoop
- EndBlueLoop:
-
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 411 Set Y2 = 494
- YellowLoop:
- If X1 = 1025 Then Goto EndYellowLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Red < 7 Then Set Red = Red + 7
- If Green < 7 Then Set Green = Green + 7
- If Red >= 7 Then Set Red = Red + 8
- If Green >= 7 Then Set Green = Green + 8
- Goto YellowLoop
- EndYellowLoop:
-
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 511 Set Y2 = 594
- MagentaLoop:
- If X1 = 1025 Then Goto EndMagentaLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Red < 7 Then Set Red = Red + 7
- If Blue < 7 Then Set Blue = Blue + 7
- If Red >= 7 Then Set Red = Red + 8
- If Blue >= 7 Then Set Blue = Blue + 8
- Goto MagentaLoop
- EndMagentaLoop:
-
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 1 Set X2 = 32
- Set Y1 = 611 Set Y2 = 694
- CyanLoop:
- If X1 = 1025 Then Goto EndCyanLoop
- UsePen(NULL,1,Red,Green,Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 32 Set X2 = X2 + 32
- If Green < 7 Then Set Green = Green + 7
- If Blue < 7 Then Set Blue = Blue + 7
- If Green >= 7 Then Set Green = Green + 8
- If Blue >= 7 Then Set Blue = Blue + 8
- Goto CyanLoop
- EndCyanLoop:
- Goto Wait_for_Input
-
-
-
-
- GetXY:
- Str(X,X$) Str(Y,Y$)
- Set Co_ords$ = "X = " + X$
- Set Co_ords$ = Co_ords$ + " Y = "
- Set Co_ords$ = Co_ords$ + Y$
- MessageBox(OK,1,INFORMATION,Co_ords$,"Mouse Co-ordinates",Res)
- Goto Wait_for_input
-
-
- All_Grids:
- Set Draw_All_Grids = 1
- Grid:
- DrawBackGround
- SetMouse()
- Set Size$ = "33"
- If Draw_All_Grids = 1 Then Goto Grid_a
- TextBox("Range is 1 - 64","Enter Grid Spacing",Size$,Btn)
- If Btn = 2 Then Goto Wait_for_Input
- Grid_a:
- Val(Size$,GridSize,Res)
- If Res = 0 Then Goto Grid
- If GridSize > 64 Then Goto Grid
- UsePen(SOLID,1,255,255,255)
- Set X1 = 0 Set X2 = 1024
- Set Y1 = 0 Set Y2 = 768
- GridLoopX:
- DrawLine(X1,Y1,X2,Y1)
- Set Y1 = Y1 + GridSize
- If Y1 < 768 Then Goto GridLoopX
- Set Y1 = 0 Set Y2 = 693
- GridLoopY:
- DrawLine(X1,Y1,X1,Y2)
- Set X1 = X1 + GridSize
- If X1 < 1024 Then Goto GridLoopY
-
- If Draw_All_Grids = 1 Then Goto Grid2
- Goto Wait_for_Input
-
-
- Grid2:
- WinGetClientRect("",cx1,cy1,cx2,cy2)
- SetRightMouse(cx1,cy1,cx2,cy2,Invert,X,Y)
- SetMouse()
- Set X1 = 0 Set X2 = 1024
- Set Y1 = 0 Set Y2 = 768
- UseBrush(NULL,0,0,0)
- UsePen(SOLID,1,255,255,255)
- DrawRectangle(X1,Y1,X2,Y2)
- FileExist("square.bmp",Res)
- If Res = 0 then Gosub SData
- If Res = 1 then Gosub Bitmaps
- UseBrush(SOLID,0,0,0)
- DrawRectangle(203,178,813,529)
- DrawLine(204,295,812,295)
- DrawLine(204,412,812,412)
- InitRed:
- Red = 0
- Green = 0
- Blue = 0
- X1 = 204 X2 = 212
- Y1 = 180 Y2 = 294
- RedScale:
- If X1 >= 810 then Goto EndRed
- UsePen(NULL,1, Red, Green, Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- X1 = X1 + 7 X2 = X2 + 7
- Red = Red + 3
- If Red > 255 Then Red = 255
- Goto RedScale
- EndRed:
- InitGreen:
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 204 Set X2 = 212
- Set Y1 = 296 Set Y2 = 411
- GreenScale:
- If X1 >= 810 then Goto EndGreen
- UsePen(NULL,1, Red, Green, Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 7 Set X2 = X2 + 7
- Set Green = Green + 3
- If Green > 255 Then Green = 255
- Goto GreenScale
- EndGreen:
- InitBlue:
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 204 Set X2 = 212
- Set Y1 = 413 Set Y2 = 528
- BlueScale:
- If X1 >= 810 then Goto EndBlue
- UsePen(NULL,1, Red, Green, Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- Set X1 = X1 + 7 Set X2 = X2 + 7
- Set Blue = Blue + 3
- If Blue > 255 Then Blue = 255
- Goto BlueScale
- EndBlue:
- If Draw_All_Grids = 1 Then Goto Grid3
-
- UseBrush(NULL,0,0,0)
- UsePen(SOLID,1,255,255,255)
- DrawRectangle(203,178,813,529)
-
- Goto Wait_For_Input
-
-
- Grid3:
- SetMouse()
- UseBrush(NULL,0,0,0)
- UsePen(SOLID,1,255,255,255)
- DrawRectangle(203,178,813,529)
- DrawLine(204,295,812,295)
- DrawLine(204,412,812,412)
- InitCyan:
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 803 Set X2 = 812
- Set Y1 = 237 Set Y2 = 294
-
- CyanScale:
- If X1 <= 202 then Goto EndCyan
- UsePen(NULL,1, Red, Green, Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- If X1 >= 794 Then Set X1 = X1 - 16
- Set X1 = X1 - 8 Set X2 = X2 - 8
- Set Green = Green + 3
- Set Blue = Blue + 3
- Goto CyanScale
- EndCyan:
- InitMagenta:
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 803 Set X2 = 812
- Set Y1 = 353 Set Y2 = 411
- MagentaScale:
- If X1 <= 202 then Goto EndMagenta
- UsePen(NULL,1, Red, Green, Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- If X1 >= 794 then Set X1 = X1 - 16
- Set X1 = X1 - 8 Set X2 = X2 - 8
- Set Red = Red + 3
- Set Blue = Blue + 3
- Goto MagentaScale
- EndMagenta:
- InitYellow:
- Set Red = 0
- Set Green = 0
- Set Blue = 0
- Set X1 = 803 Set X2 = 812
- Set Y1 = 470 Set Y2 = 528
- YellowScale:
- If X1 <= 202 then Goto EndYellow
- UsePen(NULL,1, Red, Green, Blue)
- UseBrush(SOLID,Red,Green,Blue)
- DrawRectangle(X1,Y1,X2,Y2)
- If X1 >= 794 then Set X1 = X1 - 16
- Set X1 = X1 - 8 Set X2 = X2 - 8
- Set Red = Red + 3
- Set Green = Green + 3
- Goto YellowScale
- EndYellow:
- If Draw_All_Grids = 1 Then Goto Geom
- Goto Wait_For_Input
-
- Geom:
- UseBrush(NULL,0,0,0)
- UsePen(SOLID,2,255,255,0)
- DrawEllipse(175,19,848,683)
- UsePen(SOLID,2,255,0,255)
- DrawEllipse(225,60,798,633)
- UsePen(SOLID,2,0,255,255)
- DrawEllipse(275,110,748,583)
- SetMouse(0,0,1024,768,GetXY,X,Y)
-
- Set Draw_All_Grids = 0
-
- Goto Wait_for_Input
-
-
- Locate:
- Goto Wait_for_Input
-
- Maximize:
- WinShow(Title$,MAXIMIZE,Res)
- Goto Wait_for_Input
-
- Help_Wedge:
- MessageBox(OK,1,INFORMATION,
- "The Color Wedges start from Black on the left and
- end up with the primary colors (Red-Green-blue) and
- their opposites (Yellow-Megenta-Cyan) on the right.
-
- There is also a greyscale wedge shown, starting from
- Black on the left and ending with White on the right.
- The monitor colour balance should be adjusted so that
- there is no colour shading in the greyscale.
-
- Click on the right mouse to invert the colors in the
- client rectangle.",
- "Colour Wedge",Res)
- Goto Wait_For_Input
-
- Help_Pattern:
- MessageBox(OK,1,INFORMATION,
- "This pattern consists of 3 interlaced circles.
- These serve as reference for the vertical and
- horizontal display size of your monitor. Adjust
- your monitor so that the circle is round, rather
- than an ellipse.
-
- It also shows you the coordinates of any pixel
- you point at on the screen using the left mouse.
-
- Click on the right mouse to invert the colors in the
- client rectangle.",
- "Pattern and Coordinates",Res)
- Goto Wait_For_Input
-
- Help_Grids:
- MessageBox(OK,1,INFORMATION,
- "Grid 1:
- Draws a square grid on the screen consisting
- of any choosen size, with the default value of 33.
-
- Grid 2:
- Draws 4 bull's eye patterns, each near one of the
- corners f the screen. There are also 3 wedges using
- the primary colors (Red-Green-Blue) shown in
- the middle of the screen inside a rectangle.
-
- This can help you adjust the overall display of
- your monitor (colors and position) if needed.
-
- Grid 3:
- This grid is an addition to the previous
- one in that it prints 3 more wedges using
- the opposites (Yellow-Magenta-Cyan) of the
- primary colors.
-
- Draw All:
- This last option first displays Grid 1 with the
- default value of 33 being used. It next adds
- Grid 2 and 3 to the display and finishes it
- with the Pattern/coordinates utility.
-
- Click on the right mouse to invert the colors in the
- client rectangle.",
- "All the Grids",Res)
- Goto Wait_For_Input
-
- About:
- MessageBox(OK,1,INFORMATION,
- "VR299Set is Copyright ⌐ (1994-1995)
- VYSOR Integration Inc.,
- Gatineau, Quebec, CANADA",
- "About VR299SET",Res)
-
- Goto Wait_For_Input
-
- Run_Leave:
- End
-
- Bitmaps:
- Set Image$ = SourceDir$ + "\square.bmp"
- DrawBitMap(50,25,Image$)
- DrawBitMap(808,25,Image$)
- DrawBitMap(50,528,Image$)
- DrawBitMap(808,528,Image$)
- Return
- SData:
- Set SX1 = 50 Set SY1 = 25
- Gosub Squares
- Set SX1 = 817 Set SY1 = 25
- Gosub Squares
- Set SX1 = 50 Set SY1 = 532
- Gosub Squares
- Set SX1 = 817 Set SY1 = 532
- Gosub Squares
- Return
- Squares:
- UseBrush(NULL,0,0,0)
- UsePen(SOLID,1,255,255,255)
- Set SX2 = SX1 + 150 Set SY2 = SY1 + 150
- DrawRectangle(SX1,SY1,SX2,SY2)
- Set SX1 = SX1 + 1 Set SY1 = SY1 + 1
- Set SX2 = SX2 - 1 Set SY2 = SY2 - 1
- DrawEllipse(SX1,SY1,SX2,SY2)
- Set SX1 = SX1 + 20 Set SY1 = SY1 + 20
- Set SX2 = SX2 - 20 Set SY2 = SY2 - 20
- DrawEllipse(SX1,SY1,SX2,SY2)
- Set SX1 = SX1 + 20 Set SY1 = SY1 + 20
- Set SX2 = SX2 - 20 Set SY2 = SY2 - 20
- DrawEllipse(SX1,SY1,SX2,SY2)
- Set SX1 = SX1 + 20 Set SY1 = SY1 + 20
- Set SX2 = SX2 - 20 Set SY2 = SY2 - 20
- DrawEllipse(SX1,SY1,SX2,SY2)
- Set SX1 = SX1 + 5 Set SY1 = SY1 + 5
- UseBrush(SOLID,255,255,0)
- DrawFlood(SX1,SY1,255,255,255)
- Set SX1 = SX1 -15 Set SY1 = SY1 - 15
- UseBrush(SOLID,0,255,0)
- DrawFlood(SX1, SY1,255,255,255)
- Set SX1 = SX1 - 10 Set SY1 = SY1 - 10
- UseBrush(SOLID,0,0,255)
- DrawFlood(SX1,SY1,255,255,255)
- Set SX1 = SX1 - 10 Set SY1 = SY1 - 10
- USeBrush(SOLID,255,0,0)
- DrawFlood(SX1,SY1,255,255,255)
- Return